package xiaojian.toolkit.netty.handler.codec.http.request;

import io.netty.channel.Channel;

import java.util.UUID;

import xiaojian.toolkit.util.MutableIdentifyable;

public class UncompletedHttpRequest implements MutableIdentifyable {
    private UUID uuid = UUID.randomUUID();
    private String uri;
    private long contentLength;
    private int received;
    private Channel channel;

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public long getContentLength() {
        return contentLength;
    }

    public void setContentLength(long contentLength) {
        this.contentLength = contentLength;
    }

    public int getReceived() {
        return received;
    }

    public void setReceived(int received) {
        this.received = received;
    }

    public Channel getChannel() {
        return channel;
    }

    public void setChannel(Channel channel) {
        this.channel = channel;
    }

    @Override
    public String toString() {
        return "UncompletedHttpRequest{" +
                "uri='" + uri + '\'' +
                ", contentLength=" + contentLength +
                ", received=" + received +
                '}';
    }

    @Override
    public void setIdentification(UUID id) {
        this.uuid = id;
    }

    @Override
    public UUID getIdentification() {
        return uuid;
    }
}
